ItemOptionView = function(itemPage){
	this.optionList = new Ext.List({
		scroll: false,
		listeners : {
			selectionchange: function(selectionModel, records) {
				if(records.length == 1){
					itemPage.setAnswer(records[0].data.no);
				}else{
					itemPage.setAnswer(null);
				}
	        }
		},
		store: DataStoreCollection.makeItemOptionStore([]),
        itemTpl: '<div class="item-view-answer">({no}) {option}</div>',
	});
	ItemOptionView.superclass.constructor.call(this, {
		id: 'item_option_view',
		autoHeight: true,
		items: [this.optionList]
	});
};

Ext.extend(ItemOptionView, Ext.Panel, {
	setOptions: function(options){
		if(options){
			var store = DataStoreCollection.makeItemOptionStore(options);
			this.optionList.bindStore(store);
		}
		
	}
});